<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员登录</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/body.css"/> 
<script type="text/javascript"
	src="js/jquery-easyui-1.4.1/jquery.min.js"></script>
<script type="text/javascript"
	src="js/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="js/jquery-easyui-1.4.1/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="js/common.js"></script>

<script type="text/javascript">
//action="/admin/login" method="post"
$(function(){
	$("#js-btn-login").click(function(){
		$.ajax({
			url:"/admin/login",
			data:{"username":$("#username").val(),"password":$("#password").val()},
			type:"post",
			success:function(data){
				if(data.status == "200"){
					$.messager.alert('提示',data.msg);
					window.location.href="http:localhost:8081/index";
				}else if(data.status == 400){
					$.messager.alert('提示',data.msg);
				}
			}
		});
	});

})
</script>
</head>
<body>
<div class="container">
	<section id="content">
		<form>
			<h1>管理员登录</h1>
			<div>
				<input type="text" placeholder="用户名" required="用户名不能为空" id="username"/>
			</div>
			<div>
				<input type="password" placeholder="密码" required="密码不能为空" id="password"/>
			</div>
			 <div class="">
				<span class="help-block u-errormessage" id="js-server-helpinfo">&nbsp;</span>			</div> 
			<div>
				<!-- <input type="submit" value="Log in" /> -->
				<input type="submit" value="登录" class="btn btn-primary" id="js-btn-login"/>
				<a href="#">忘记密码?</a>
				<!-- <a href="#">Register</a> -->
			</div>
		</form><!-- form -->
		 <div class="button">
			<span class="help-block u-errormessage" id="js-server-helpinfo">&nbsp;</span>
			<a href="#">游客进入</a>	
		</div> <!-- button -->
	</section><!-- content -->
</div>

<br><br><br><br>
</body>
</html>